<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>伪类选择器_结构伪类3</title>
    <style>
        /* div>p:nth-of-type(5) {
            color: red;
        } */

        /* div>p:nth-last-of-type(2) {
            color: red;
        } */

        /* span:only-child {
            color: red;
        } */

        /* span:only-of-type {
            color: red;
        } */

        /* :root {
            background-color: gray;
        } */

        /* div:empty {
            width: 100px;
            height: 100px;
            background-color: red;
        } */
    </style>
</head>

<body>
    <!-- 结构1 -->
    <!-- <div>
        <span>测试1</span>
        <p>张三：98</p>
        <p>李四：88</p>
        <p>王五：78</p>
        <p>赵六：68</p>
        <p>孙七：58</p>
        <p>老八：48</p>
        <span>测试2</span>
    </div> -->

    <!-- 结构2 -->
    <!-- <div>
        <span>测试1</span>
    </div>
    <div>
        <span>测试2</span>
        <p>张三：98</p>
        <p>李四：88</p>
        <p>王五：78</p>
        <p>赵六：68</p>
        <p>孙七：58</p>
        <p>老八：48</p>
    </div> -->

    <!-- 结构3 -->
    <div>

    </div>
</body>

</html>